package com.jic.order.enums;

public enum OrderTypeEnum {
    Normal_Single(0, "普通单物品订单"),
    Combine_Order(1, "合并父订单"),
    Combine_Sub_Order(2, "合并后拆分的子订单"),
    Activity_Order(3, "活动支付订单"),
    Agent_Order(4, "代理订单，下单代扣");
    private Integer code;

    private String message;

    OrderTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static OrderTypeEnum getByCode(Integer code){
        OrderTypeEnum[] values = OrderTypeEnum.values();
        for(OrderTypeEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
